package com.xujiang.common_adapter.holder;

import android.content.Context;
import android.support.annotation.IdRes;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * @author xujiang
 * @version 2017-07-10 16:25
 */
public class BaseRecyclerViewHolder<K> extends RecyclerView.ViewHolder
        implements IBaseViewHolder<K> {

    public BaseRecyclerViewHolder(View itemView) {
        super(itemView);

    }

    @Override
    public void onHandle(K item, int position) {

    }

    @Override
    public void onHandle(K item, int position, Object args) {

    }

    @SuppressWarnings("unchecked")
    @Override
    public <T extends View> T findViewById(@IdRes int id) {
        return (T) itemView.findViewById(id);
    }

    @Override
    public Context getContext() {
        return itemView.getContext();
    }
}
